package com.heraleign.boot.controller;

import com.heraleign.boot.service.UserService;
import org.apache.catalina.User;
import org.springframework.web.bind.annotation.*;

@RestController
public class UserSubmitController {
    //@RequestMapping(value = "/user" ,method= RequestMethod.GET)
    @GetMapping(value="/user")
    public String getUser(){
        UserService user = new UserService();
        String hello=user.getUser();
        return hello;
    }
    @RequestMapping(value = "/user" ,method= RequestMethod.POST)
    public String postUser(){
        return "Post-User";
    }
    //@RequestMapping(value = "/user" ,method= RequestMethod.DELETE)
    @DeleteMapping(value="/user")
    public String deleteUser(){
        return "Delete-User";
    }
    @RequestMapping(value = "/user" ,method= RequestMethod.PUT)
    public String putUser(){
        return "Put-User";
    }
}
